﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data.SqlClient;
using System.Data;
using System.Collections;

using XJX.DBCore;

namespace XJX.DataLayer
{
    public sealed class Other : XJX.DBCore.DBObject
    {
        public Other(string newConnectionString) : base(newConnectionString) { }


        //获取所有分类信息
        public DataSet Get_ALL_Category()
        {

            SqlParameter[]
                parameters = {
								
							 };

            using (DataSet ds = RunProcedure("Get_ALL_Category", parameters, "AllCategoryInfo"))
            {
                return ds;
            }
        }

        //获取所有参数信息
        public DataSet Get_All_Param()
        {

            SqlParameter[]
                parameters = {
								
							 };

            using (DataSet ds = RunProcedure("Get_All_Param", parameters, "AllParamInfo"))
            {
                return ds;
            }
        }

        //根据传入的过程名称，分别得到汇总报表的数据
        public DataSet Ad_Report_Get_Summary_List(string proc, string TableName)
        {
            SqlParameter[] parameters = {};

            using (DataSet ds = RunProcedure(proc, parameters, TableName))
            {
                return ds;
            }
        }

        //得到指定ID的模板信息
        public DataSet Get_Templater_Content_From_ID(int ID)
        {
            SqlParameter[]
                parameters = {
								 new SqlParameter("@ID", SqlDbType.Int)
							 };

            parameters[0].Value = ID;

            using (DataSet ds = RunProcedure("Get_Templater_Content_From_ID", parameters, "TemplaterInfo"))
            {
                return ds;
            }
        }
        
    }
}